** Generate predictions for Figure 2

use "vote_08_10.dta"

encode state, gen(st)
replace nokken_poole_dim1 = abs(nokken_poole_dim1)

reghdfe incvote c.solo_other_pres_earmarks_log_num##c.log_area po1 spendgap fr nokken_poole_dim1 incpres incvotep i.year#i.dem, vce(cl st#district) 

summ solo_other_pres_earmarks_log_num
centile (solo_other_pres_earmarks_log_num), centile (0(1)100)
centile (log_area), centile (25 75)

margins, at(solo_other_pres_earmarks_log_num = (0 ///
0.1386294 ///
1.386294 ///
1.791759 ///
2.079442 ///
2.197225 ///
2.302585 ///
2.397895 ///
2.484907 ///
2.564949 ///
2.639057 ///
2.70805 ///
2.772589 ///
2.833213 ///
2.890372 ///
2.944439 ///
2.995732 ///
3.044522 ///
3.077086 ///
3.091042 ///
3.135494 ///
3.178054 ///
3.218876 ///
3.258097 ///
3.295837 ///
3.332205 ///
3.367296 ///
3.401197 ///
3.433987 ///
3.465736 ///
3.496508 ///
3.526361 ///
3.555348 ///
3.583519 ///
3.610918 ///
3.663562 ///
3.711103 ///
3.73767 ///
3.7612 ///
3.78419 ///
3.828641 ///
3.871201 ///
3.931826 ///
3.988984 ///
4.025352 ///
4.100903 ///
4.218026 ///
4.26268 ///
4.405359 ///
4.672829) log_area = (5.753195 8.855136)) atmeans post

